/*
** MSF File System


4 bytes size of compressed data
4 bytes size of uncompressed data
4 bytes CRC32
4 bytes pointer to file name
4 bytes pointer to compressed data
4 bytes pointer to next file
*/

typedef struct {
	UINT8* data;
	UINT32 size;
	const char* filename;
} MSFFileSystemHandle;


class CMSFFileSystem : public CBaseFileSystem {
	public:
		int Mount(const char* path);
		void CloseFile(FILE_HANDLE file); // Close file
		UINT64 GetFileSize(FILE_HANDLE file); // Get size of file
		void Seek(FILE_HANDLE file, UINT32 offset); // Seek to a specific offset in the file
		UINT64 Read(FILE_HANDLE file, UINT8* buf, UINT32 readsize); // Read stuff
		UINT64 Write(FILE_HANDLE file, UINT8* buf, UINT32 writesize); // Write stuff
		FILE_HANDLE OpenFile(const char* fn, UINT32 permission); // Open stuff
};